# -*- coding:utf-8 -*-

'''
PROJECT_NAME : python_高级
file    : 属性查找顺序
author  : 1032162439@qq.com
date    : 2022-11-08 13:33
IDE     : PyCharm
'''



class Hero:
    """
    实体类
    """
    #  如果不定义__getattr__，直接报错
    def __getattr__(self, item):
        print(item)



def main():
    # 实例化
    luban = Hero()
    print(luban.name)


if __name__ == '__main__':
    main()
